id: task-68 title: Verify Windows binary uses .exe status: Done assignee:
- '@codex' created_date: '2025-06-15' updated_date: '2025-06-15' labels:
- packaging dependencies: []
Description
Ensure the platform wrapper scripts select the correct compiled binary on Windows.
The executable should include the .exe suffix so that global installation works
with npx and bunx.
Acceptance Criteria
- [x]
cli.cjsresolvesbacklog.exewhenprocess.platformiswin32. - [x]
cli-download.cjsdownloadsbacklog.exeon Windows. - [x] Unit tests cover these behaviors.
Implementation Notes
The Windows .exe extension handling has been fully implemented:
-
getBinaryName.cjs (shared utility):
- Correctly detects Windows platform using
process.platform === "win32" - Appends
.exeextension to binary names on Windows - Maps Node.js platform names to Bun target names appropriately
- Correctly detects Windows platform using
-
cli.cjs (wrapper script):
- Uses
getBinaryName()to resolve the correct binary name including.exeon Windows - Spawns the binary with
windowsHide: trueoption for better Windows compatibility
- Uses
-
cli-download.cjs (download script):
- Uses
getBinaryName()to download the correct binary with.exeextension on Windows - Skips chmod operation on Windows (only sets executable permissions on Unix)
- Also uses
windowsHide: truewhen spawning the downloaded binary
- Uses
-
Test Coverage:
getBinaryName.test.tsspecifically tests that.exeis appended on Windows platformbuild.test.tshandles Windows executable naming in build tests- All tests pass successfully